package com.hxs.learn.entity.core;

import java.util.Date;

import org.apache.ibatis.type.Alias;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.hxs.learn.common.entity.BaseEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * @author huxinsheng
 * @date 2018-04-24 15:32:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_menu_permission")
@Alias(value = "SysMenuPermission")
public class SysMenuPermission implements BaseEntity {

    /**
     * 编号
     */
    @TableId(
        value = "id",
        type  = IdType.AUTO
    )
    private Integer id;

    /**
     * 创建人
     */
    @TableField(
        value    = "creator",
        strategy = FieldStrategy.NOT_EMPTY
    )
    private String creator;

    /**
     * 菜单ID
     */
    @TableField(
        value    = "menuId",
        strategy = FieldStrategy.NOT_EMPTY
    )
    private String menuId;

    /**
     * 权限ID
     */
    @TableField(
        value    = "permissionId",
        strategy = FieldStrategy.NOT_EMPTY
    )
    private String permissionId;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    @JsonFormat(
        pattern  = "yyyy-MM-dd HH:mm:ss",
        timezone = "GMT+8"
    )
    private Date createTime;
}


//~ Formatted by Jindent --- http://www.jindent.com
